package require tdom

encoding system "utf-8"

# read xml
set fh [open "test2.xml" "r"]
set xml_data [read $fh]
close $fh

# read xslt
set fh [open "test.xsl" "r"]
set xslt_data [read $fh]
close $fh

# process xml files
set xmlTree [dom parse $xml_data]
set xslTree [dom parse $xslt_data]

# do xsl transformation
puts [[$xmlTree xslt $xslTree] asXML]